<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title>验证身份</title>
        <link rel="stylesheet" href="/css/weixin/jquery.mobile-1.2.1.min.css" />
        <script src="/js/weixin/jquery-1.8.3.min.js"></script>
        <script src="/js/weixin/jquery.mobile-1.2.1.min.js"></script>
        <script>
            function form_submit()
            {
                var email = $("#email").val();
                var password = $("#Password").val();
                var aQuery = window.location.href.split("?");
                var startIndex = aQuery[1].indexOf('=') + 1;
                var uid = aQuery[1].substring(startIndex, aQuery[1].length);
                $.ajax({
                    type: "POST",
                    url: "/weixin/login/",
                    data: {"email": email, "password": password, "uid": uid},
                    dataType: "json",
                    success: function(obj) {
                        if (obj.value === 0)
                        {
                            $("#notification").text("请输入正确的邮箱和密码");
                            return false;
                        }
                        if (obj.value === 1)
                        {
                            $("#notification").text("验证通过,请按照微信提示操作");
                            return false;
                        }
                    }
                });
            }


        </script>
    </head>
    <body>
        <div data-role="page" id="callAjaxPage">
            <div data-role="content"> 
                <form id="form1" action="" method="post">     
                    <div data-role="fieldcontain">
                        <label for="email">
                            邮箱:
                        </label>
                        <input name="email" id="email" placeholder="" value="" type="email">
                    </div>
                    <div data-role="fieldcontain">
                        <label for="Password">
                            密码:
                        </label>
                        <input name="Password" id="Password" placeholder="" value="" type="password">
                    </div>

                    <button data-theme="b" id="submit" onclick="form_submit();" type="button">提 交</button>
                    <h3 id="notification"></h3>
                </form>
            </div>
        </div>
    </body>
</html>